package com.zyh.homework.test5.domian;

public class Book {
    private String id;
    private String bName;
    public int price;

//    构造方法
    public Book() {
    }

    public Book(String id, String bName, int price) {
        this.id = id;
        this.bName = bName;
        this.price = price;
    }

//    行为
    public void show(){
        System.out.println("图书编号为"+getId()+"的"+getbName()+"图书价格是"+getPrice());
    }

    @Override
    public String toString() {
        return "Book{" +
                "id='" + id + '\'' +
                ", bName='" + bName + '\'' +
                ", price=" + price +
                '}';
    }

    //    setter and getter
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getbName() {
        return bName;
    }

    public void setbName(String bName) {
        this.bName = bName;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
